home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Ahoy 1987 June
/
Ahoy_Magazine_87-06_1987_Double_L.d64
/
Crafty Comp
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
383b
|
16 lines
0 rem << cd42-4 >>
1 rem ==================================
2 rem commodares problem #38-2 :
3 print"[147]crafty comparison "
4 rem solution by
5 rem carmen artino
6 rem ==================================
7 print"input 4 numbers, one at a time"
10 for j=0 to 3 : input x
20 n(j)=x : next j
30 m=n(0)
40 for j=1 to 3
50 m=(abs(n(j)-m) + n(j) + m)/2
90 next j
99 print m "is the largest value"